<?php
/**
 * Copyright (C), 2016-2018, Shall Buy Life info. Co., Ltd.
 * FileName:TaskService.php
 * Description: 说明
 *
 * @author
 * @Create Date
 * @Update Date
 * @version v1.0
 */

namespace Example\Services\Task;

use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;

final class TaskService extends BasicService
{
    /**
     * FunctionName：process
     * Description：执行逻辑
     * Author：lwl
     */
    protected function process()
    {
        DB::beginTransaction();
        try {

        }catch (\Exception $exception){
            DB::rollBack();
            Log::channel('task_error')->debug('计划任务-异常',['error_message'=>$exception->getMessage()]);
        }
        DB::commit();
    }

    /**
     * FunctionName：run
     * Description：执行出口
     * Author：lwl
     */
    public function run()
    {
        $this->process();
        taskLog();
        return true;
    }
}
